class CreateOpinions < ActiveRecord::Migration
  def self.up
    create_table :opinions do |t|
      t.column :user_id,:integer,:null=>false
      t.column :enterprise_id,:integer,:null=>false
      t.column :taste_grade_id,:integer,:null=>false        #口味评分
      t.column :entironment_grade_id,:integer,:null=>false  #环境评分
      t.column :service_grade_id,:integer,:null=>false      #服务评分
      t.column :opinion,:string                              #具体评价
      t.column :general_grade_id,:integer,:null=>false      #总体评分
      t.column :favorite_menu,:string,:limit=>128           #最喜欢的菜肴
      t.column :classify,:string,:limit=>128                #分类标签
      t.column :parking,:string                               #停车情况
    end
  end

  def self.down
    drop_table :opinions
  end
end
